<template>
  <div>
    <div class="pageCon recommentGood-detail">
      <h4 class="title">{{detail.title}}</h4>
      <div class="time flex-center-start">
        <img src="../../assets/images/common/time.png" alt="" width="14" height="14" class="timeimg">
        <span>{{detail.publishTime}}</span>
        </div>
      <div class="line"></div>
      <div v-html="detail.content"></div>
    </div>
  </div>
</template>
<script>
  import {
    ref,
    onMounted
  } from "vue";
  import {
    useRoute
  } from "vue-router";
  import { queryNewsDetail } from '@/api/register.js'
  export default {
    setup() {
      const route = useRoute()
      const  detail= ref({})
      const getData = async () =>{
        queryNewsDetail({newsId: route.query.id}).then(res=> {
          console.log('detail',res)
          detail.value = res.data.respData
        })
      }
      onMounted(getData)
      return {
        route,
        detail,
      }
    }
  }
</script>
<style lang="less" scoped>
.recommentGood-detail{
  padding:70px 0 80px;
  .title{
    font-size: 32px;
    color:@color3;
  }
  .time{
    font-size: 12px;
    color:@color9;
    .timeimg{
      margin-right:10px;
    }
  }
  .line{
    width: 100%;
    height: 1px;
    background: #edeef4;
    margin:20px 0 30px;
  }
}
</style>